const Router = require('koa-router');
const api_v1 = require('./api_v1');
const swaggerSpec =  require('./api_v1_doc');

const router = new Router();
router.use('/api/v1', api_v1.routes(), api_v1.allowedMethods());
router.get('/api/v1/swagger.json', async function (ctx) { ctx.set('Content-Type', 'application/json'); ctx.body = swaggerSpec; });

module.exports = router;
